package Properrtices;

import java.util.Properties;
import java.util.Set;
import java.util.Map;

public class ProperticesDemo {
	public static void main(String[] args) {
		Properties prop = new Properties();
		prop.put("CZBK001", "zhangsan");
		prop.put("CZBK002", "lisi");
		prop.put("CZBK003", "wangwu");
		//遍历属性列表
		//获取所有的key，通过key获取value
		Set<Object> keys = prop.keySet();
		for(Object key:keys) {
			Object value = prop.get(key);
			System.out.println(value);
		}
		//获取所有的结婚证对象
		Set<Map.Entry<Object,Object>> entrys = prop.entrySet();
		for(Map.Entry<Object, Object> entry:entrys) {
			Object key = entry.getKey();
			Object value = entry.getValue();
			System.out.println(key + "=" + value);
		}
	}
}
